package com.newx.common.sms.factory;

import com.newx.common.sms.config.AokSendConfig;
import com.newx.common.sms.service.AokSendSmsImpl;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.dromara.sms4j.provider.factory.AbstractProviderFactory;
import org.springframework.stereotype.Component;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
@Component
public class AokSendFactory extends AbstractProviderFactory<AokSendSmsImpl, AokSendConfig> {

    private static final AokSendFactory INSTANCE = new AokSendFactory();

    /**
     * 获取建造者实例
     * @return 建造者实例
     */
    public static AokSendFactory instance() {
        return INSTANCE;
    }

    @Override
    public AokSendSmsImpl createSms(AokSendConfig aokSendConfig) {
        return new AokSendSmsImpl(aokSendConfig);
    }

    @Override
    public String getSupplier() {
        return "AokSend";
    }
}
